package cqrtplm.service;

import com.hustcad.plm.pdm.classification.model.dto.TyplmClassificationEntityDTO;
import com.hustcad.plm.pdm.constraint.model.vo.TyplmConstraintRuleDefVO;
import com.hustcad.plm.pdm.enumeration.model.dto.HandleEnumItemDTO;
import com.ty.basic.entity.IdentifierEntity;
import com.ty.basic.response.ResponseResult;
import com.ty.basic.vo.AttributeVO;
import cqrtplm.dto.*;
import cqrtplm.entity.DescribeSpliceRuleDO;
import cqrtplm.vo.DescriptionRuleVO;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;

public interface RTClassificationService {

    void importClassification(ImportClassificationDTO importClassificationDTO) throws Exception;

    void updateClassifyTree(RTClassifyTreeDTO rtClassifyTreeDTO);

    String addDevelopmentOrder(RTProductDevelopmentOrderDTO rtProductDevelopmentOrderDTO);

    ResponseResult<RTProductDevelopmentOrderDTO> queryProjectDetailByOid(
            RTProductDevelopmentOrderDTO rtProductDevelopmentOrderDTO);

    void updateAttributeByClassification(AttributeAndClassificationDTO dto);

    void saveAttrDescribeRule(DescribeSpliceRuleDTO describeTheSplicingRulesDO);

    DescribeSpliceRuleDO queryAttrDescribeRule(IdentifierEntity entity);

    DescriptionRuleVO spliceDescriptionRules(List<DescriptionRuleDTO> list);

    List<String> queryAllProductLine(BigInteger parentoid);

    List<ImportCategoryAttributeCardDTO> getCategoryAttributeCardDTOS(MultipartFile file);

    TyplmClassificationEntityDTO createClassAttrCard(CategoryAttributeCardDTO dto, String parentId, String classRootId);

    void createClassCardAndAttrLink(List<AttributeVO> attributeVOSList2, Map<String, AttributeCardDTO> attributeMap , IdentifierEntity classEntity);

    void updateAttrDefaultValueAndEnum(Map<String, AttributeCardDTO> attributeMap, IdentifierEntity classEntity, CategoryAttributeCardDTO dto,
                                  List<TyplmConstraintRuleDefVO> enumDiscreteSetConstraint, BigInteger enumGroupId);

    void classificationOperator(BigInteger classificationOid, String type);

    void checkEnumByClassId(HandleEnumItemDTO handleEnumItemDTO);

}
